package com.typhoon

import com.typhoon.service.HelloService
import lombok.extern.slf4j.Slf4j
import org.junit.Test
import org.junit.runner.RunWith
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit4.SpringRunner

/**
 *
 * @author shuya | dongfeng.zdf@alibaba-inc.com
 * @description
 * @date 2018/10/24 下午3:07
 * @since V2.0.0
 * @description
 * @modified by
 */
@RunWith(SpringRunner::class)
@SpringBootTest(classes = arrayOf(KotlinDemoApplication::class),
        webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class KotlinDemoApplicationTests {

    val log = LoggerFactory.getLogger(this.javaClass)

    @Autowired
    lateinit var helloService: HelloService;

    @Test
    fun whenCalled_shouldReturnHelloService() {
        var result = this.helloService.hello()
        log.info("result:{}",result)
    }

}